﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using RootBaseFramework.Infra.Data;
using TestRootBaseData.Service.Model;
using TestRootBaseData.Service.Model.ModelConfiguration;


namespace TestRootBaseData.Service.Repository.Database
{
   public class RootBaseTestContext
       : DbContext, IContext
    {

       public RootBaseTestContext()
           : base("TestRootBaseData.Properties.Settings.Setting")
        {

        }
        public DbSet<Person> People { get; set; }       

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            // modelBuilder.Configurations.Add<Employee>(new EmployeeTypeConfiguration());

            modelBuilder.Configurations.Add<Person>(new  PersonConfiguration());
        


            base.OnModelCreating(modelBuilder);


        }



    }

}
